package com.ptszyxx.popose.common.enums;

import com.ysg.utils.YStringUtil;

public enum RankItemEnum {
    day("1", "日榜"),
    week("2", "周榜"),
    month("3", "月榜");

    private String type;
    private String name;

    RankItemEnum(String type, String name){
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static RankItemEnum get(String name){
        RankItemEnum[] values = values();
        for (RankItemEnum item: values) {
            if (YStringUtil.eq(item.getName(), name)){
                return item;
            }
        }
        return null;
    }

}
